package com.gbk.clickhouseservicestruct.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.myweb.ck.mapping.ChTable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * @Project: data-service-struct
 * @Package: com.les.its.ds.model
 * @Author： mujian
 * @Create： 2024/1/2 16:37
 * @Description： TODO
 * @History: modify
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ChTable(name = "tig.T_TIG_ROAD_LINK_STATUS")
public class TIG_ROAD_LINK_STATUS {

    /**
     * linkID
     */
    private String link_ID;

    /**
     * 配置在road中序号
     */
    private Integer seq_no;

    /**
     * 路段长度
     */
    private Double len;

    /**
     * 路段交通状态，1畅通 2缓慢 3拥堵 4极度拥堵 5⽆数据
     */
    private Integer state;

    /**
     * 速度，单位公⾥/⼩时
     */
    private Double speed;

    /**
     * 通行时间，单位秒
     */
    private Integer travelTime;

    /**
     * 统计时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date check_time;
}
